
# test definition: 
#  ['doc', 
#   ?'gdb command' => 'verify', ? 
#   ...
#  ],
#
# NOTES: 
#    1. this file will be evaluated by perl, and expected to return an array of arrys
#    2. the verify might be:
#       a. empty string : for skipping test
#       b. string: will be evaluate as regexpr
#       c. Regexpr reference (like qr/abc/i ) : will be evaluate as regexpr
#       d. code reference (like sub { ... }   : will be executed
#

(
 ['check if memory protected' ,
  'x/x 0xf1234567' => 'Cannot access memory at' 
  ],

 ['check qImg',
  'maintenance packet qImg' => '5[25]6\d_' 
  ],

 ['check psl',
  'psl 0 cu_timer' => '=\s*\d\d\d\d\d' 
  ],

 ['tstatus test',
  'd tracepoint' => '' ,
  'trace lock_lru' => sub { hook_run 'data-unraised-pane' ; return 1 },
  'passcount 1' => '',
  'tstart' => '',
  'tstop' => '',
  'tstatus' => qr/^ 1\s+0x[\da-f]+\s+0x[\da-f]/m ,
  'tstatus 1' => 'Non Active' 
  ],

 ['test inline',
  'inline 99,'  => 'UTILITY 99 -- Display ERRORS symptom codes' 
  ],

# NOTE: not valid for 68 and up !
 ['print-space-live (66 and 67 code only)',
  'psl 0 /x cache_start_add' => sub {
      
      my $res = shift ;
      $res =~ /(0x\w+)/ or return 0 ;
      my $ptr = $1 ;
      $res = gdb_exec "psl 1 /x *(T_CACHE_HEADER*) $ptr" ;
      $res =~ /cache_slot_ph_add\s*=\s*$ptr/ ;

      #   NOTE:   67: TCO_CACHE_HEADER , 66: T_CACHE_HEADER

  }, 
  ],
)




















